geno<-read.table("/data1/bsi/BORA_processing/devel/eqtl/temp/genotype.txt",sep=" ")
expr<-read.table("/data1/bsi/BORA_processing/devel/eqtl/temp/expr.txt",sep="\t")
l<-dim(geno)
z<-1
expr1<-as.vector(as.numeric(expr))
kk1<-c()
while(z<l[1]+1)
{
	geno1<-as.vector(as.numeric(geno[z,]))
	d1 <- data.frame(geno1,expr1)
	glm1 <- glm(expr1 ~ geno1, data=d1,family=gaussian(link="log"))
	pval <-summary(glm1)$coefficients["geno1","Pr(>|t|)"][1]
	# pval <-tryCatch(summary(glm1)$coefficients["geno1","Pr(>|t|)"][1],error=function(e){NA;})
	z<-z+1
	kk<-coefficients(summary(glm1))
	kk1<-c(kk1,kk)
}
c1<-rownames(expr)
c2<-rownames(geno)
cc<-rbind(c1,c2)
write.table(cc,"/data1/bsi/BORA_processing/devel/eqtl/temp/gg1",quote=FALSE,sep="\t",col.names=FALSE,row.names=FALSE)
write.table(kk1,"/data1/bsi/BORA_processing/devel/eqtl/temp/gg",quote=FALSE,sep="\t",col.names=FALSE)
